package com.ruoyi.diagnosis.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.diagnosis.mapper.DetailMapper;
import com.ruoyi.diagnosis.domain.Detail;
import com.ruoyi.diagnosis.service.IDetailService;

/**
 * 历史记录Service业务层处理
 * 
 * @author fansea
 * @date 2024-07-22
 */
@Service
public class DetailServiceImpl extends ServiceImpl<DetailMapper,Detail> implements IDetailService
{
    @Autowired
    private DetailMapper detailMapper;

    /**
     * 查询历史记录
     * 
     * @param figureId 历史记录主键
     * @return 历史记录
     */
    @Override
    public Detail selectDetailByFigureId(Long figureId)
    {
        return detailMapper.selectDetailByFigureId(figureId);
    }

    /**
     * 查询历史记录列表
     * 
     * @param detail 历史记录
     * @return 历史记录
     */
    @Override
    public List<Detail> selectDetailList(Detail detail)
    {
        return detailMapper.selectDetailList(detail);
    }

    /**
     * 新增历史记录
     * 
     * @param detail 历史记录
     * @return 结果
     */
    @Override
    public int insertDetail(Detail detail)
    {
        return detailMapper.insertDetail(detail);
    }

    /**
     * 修改历史记录
     * 
     * @param detail 历史记录
     * @return 结果
     */
    @Override
    public int updateDetail(Detail detail)
    {
        return detailMapper.updateDetail(detail);
    }

    /**
     * 批量删除历史记录
     * 
     * @param figureIds 需要删除的历史记录主键
     * @return 结果
     */
    @Override
    public int deleteDetailByFigureIds(Long[] figureIds)
    {
        return detailMapper.deleteDetailByFigureIds(figureIds);
    }

    /**
     * 删除历史记录信息
     * 
     * @param figureId 历史记录主键
     * @return 结果
     */
    @Override
    public int deleteDetailByFigureId(Long figureId)
    {
        return detailMapper.deleteDetailByFigureId(figureId);
    }
}
